diff -uNr v02-07.ORIG/examples/cpp/drawevent/CMakeLists.txt v02-07/examples/cpp/drawevent/CMakeLists.txt --- v02-07.ORIG/examples/cpp/drawevent/CMakeLists.txt 2016-02-18 15:32:33.000000000 +0900 +++ v02-07/examples/cpp/drawevent/CMakeLists.txt 2016-02-18 16:44:56.000000000 +0900 @@ -29,7 +29,7 @@ ENDFOREACH() # definitions to pass to the compiler -ADD_DEFINITIONS( "-Wall -ansi -pedantic" ) +ADD_DEFINITIONS( "-Wall -ansi -pedantic -std=c++11" ) ADD_DEFINITIONS( "-Wno-long-long" ) diff -uNr v02-07.ORIG/src/cpp/CMakeLists.txt v02-07/src/cpp/CMakeLists.txt --- v02-07.ORIG/src/cpp/CMakeLists.txt 2016-02-18 15:32:47.000000000 +0900 +++ v02-07/src/cpp/CMakeLists.txt 2016-02-18 23:23:20.000000000 +0900 @@ -241,6 +241,7 @@ # -------- compiler definitions ---------------------------------------------- +#ADD_DEFINITIONS( "-Wall -ansi -pedantic" ) ADD_DEFINITIONS( "-Wall -ansi -pedantic" ) ADD_DEFINITIONS( "-Wno-long-long -fno-strict-aliasing" ) @@ -386,7 +387,6 @@ ###CCC LIST( APPEND lcio_rootdict_sources ${ROOT_DICT_OUTPUT_SOURCES} ) - # ------ build lcioDict library --------------------------------- INCLUDE_DIRECTORIES( "${ROOT_DICT_OUTPUT_DIR}" ) @@ -395,10 +395,17 @@ ADD_SHARED_LIBRARY( lcioDict ${lcio_rootdict_sources} ) TARGET_LINK_LIBRARIES( lcioDict ${ROOT_LIBRARIES} lcio ) + # ------ custom build rule --------------------------------- + + TARGET_COMPILE_OPTIONS( lcioDict PRIVATE -Wall -ansi -pedantic -std=c++11 ) + IF( APPLE ) SET_TARGET_PROPERTIES( lcioDict PROPERTIES LINKER_FLAGS "-single_module -undefined dynamic_lookup -bind_at_load" ) + +# SET_TARGET_PROPERTIES( lcioDict PROPERTIES COMPILER_CXX_FLAGS +# "-Wall -ansi -pedantic -std=c++11" ) ADD_CUSTOM_TARGET(dylib2so COMMAND ${CMAKE_COMMAND} -E create_symlink liblcio.dylib liblcio.so diff -uNr v02-07.ORIG/src/f77/CMakeLists.txt v02-07/src/f77/CMakeLists.txt --- v02-07.ORIG/src/f77/CMakeLists.txt 2016-02-18 15:32:53.000000000 +0900 +++ v02-07/src/f77/CMakeLists.txt 2016-02-18 23:54:04.000000000 +0900 @@ -35,6 +35,7 @@ simjob_chain ) + # create symbolic bin target for calling targets bin_XXX ADD_CUSTOM_TARGET( f77 ) @@ -43,6 +44,7 @@ # create target for binary ADD_EXECUTABLE( f77_${bin} ${bin}.F ) SET_TARGET_PROPERTIES( f77_${bin} PROPERTIES OUTPUT_NAME ${bin}_F ) + TARGET_COMPILE_OPTIONS( f77_${bin} PRIVATE -fno-range-check ) # tell bin target to call this bin_XXX target ADD_DEPENDENCIES( f77 f77_${bin} )