From 59d2ed44ba78c5618c6ec1c87c255eaec9ac1b7b Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Mon, 21 Dec 2020 10:30:26 -0600 Subject: [PATCH 01/10] adding build_exe option to cmake --- cmake/DAGMC_macros.cmake | 123 ++++++++++++++++++++++++--------------- 1 file changed, 75 insertions(+), 48 deletions(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index db445c4c48..78a3f01939 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -67,6 +67,7 @@ macro (dagmc_setup_options) option(BUILD_STATIC_LIBS "Build static libraries" ON) option(BUILD_STATIC_EXE "Build static executables" OFF) + option(BUILD_EXE "Build DAGMC executables" ON) option(BUILD_PIC "Build with PIC" OFF) option(BUILD_RPATH "Build libraries and executables with RPATH" ON) @@ -96,12 +97,12 @@ endif() if (NOT BUILD_STATIC_LIBS AND BUILD_STATIC_EXE) message(FATAL_ERROR "BUILD_STATIC_EXE cannot be ON while BUILD_STATIC_LIBS is OFF") endif () - if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_EXE) - message(FATAL_ERROR "BUILD_STATIC_EXE cannot be OFF while BUILD_SHARED_LIBS is OFF") - endif () if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_LIBS) message(FATAL_ERROR "BUILD_SHARED_LIBS and BUILD_STATIC_LIBS cannot both be OFF") endif () + if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_EXE AND BUILD_EXE) + message("Turning BUILD_EXE to OFF: SHARED_BUIL_LIBS and BUILD_STATIC_EXE are OFF") + endif () endmacro () macro (dagmc_setup_flags) @@ -128,22 +129,24 @@ macro (dagmc_setup_flags) set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "") set(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "") - if (BUILD_STATIC_EXE) - message(STATUS "Building static executables") - set(BUILD_SHARED_EXE OFF) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX}) - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") - set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) - set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) - set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS) - set(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS) - set(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS) - set(CMAKE_EXE_LINK_DYNAMIC_Fortran_FLAGS) - else () - message(STATUS "Building shared executables") - set(BUILD_SHARED_EXE ON) - set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX}) - endif () + if(BUILD_EXE) + if (BUILD_STATIC_EXE) + message(STATUS "Building static executables") + set(BUILD_SHARED_EXE OFF) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_STATIC_LIBRARY_SUFFIX}) + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static") + set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS) + set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) + set(CMAKE_SHARED_LIBRARY_LINK_Fortran_FLAGS) + set(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS) + set(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS) + set(CMAKE_EXE_LINK_DYNAMIC_Fortran_FLAGS) + else () + message(STATUS "Building shared executables") + set(BUILD_SHARED_EXE ON) + set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX}) + endif () + endif() if (BUILD_RPATH) if (CMAKE_INSTALL_RPATH) @@ -259,6 +262,7 @@ endmacro () # Install an executable macro (dagmc_install_exe exe_name) +<<<<<<< HEAD message(STATUS "Building executable: ${exe_name}") dagmc_get_link_libs() @@ -276,47 +280,70 @@ macro (dagmc_install_exe exe_name) INSTALL_RPATH_USE_LINK_PATH TRUE) target_link_libraries(${exe_name} PUBLIC ${LINK_LIBS_SHARED}) endif () +======= + if( NOT $BUILD_EXE) + message(STATUS "Skiping executable ${exe_name} build") +>>>>>>> adding build_exe option to cmake else () - if (BUILD_STATIC_EXE) - target_link_libraries(${exe_name} ${LINK_LIBS_STATIC}) + message(STATUS "Building executable: ${exe_name}") + + dagmc_get_link_libs() + + add_executable(${exe_name} ${SRC_FILES}) + if (BUILD_RPATH) + if (BUILD_STATIC_EXE) + set_target_properties(${exe_name} + PROPERTIES INSTALL_RPATH "" + INSTALL_RPATH_USE_LINK_PATH FALSE) + target_link_libraries(${exe_name} ${LINK_LIBS_STATIC}) + else () + set_target_properties(${exe_name} + PROPERTIES INSTALL_RPATH "${INSTALL_RPATH_DIRS}" + INSTALL_RPATH_USE_LINK_PATH TRUE) + target_link_libraries(${exe_name} ${LINK_LIBS_SHARED}) + endif () else () target_link_libraries(${exe_name} PUBLIC ${LINK_LIBS_SHARED}) endif () - endif () - install(TARGETS ${exe_name} DESTINATION ${INSTALL_BIN_DIR}) + install(TARGETS ${exe_name} DESTINATION ${INSTALL_BIN_DIR}) + endif() endmacro () # Install a unit test macro (dagmc_install_test test_name ext) - message(STATUS "Building unit tests: ${test_name}") - - list(APPEND LINK_LIBS gtest) - - dagmc_get_link_libs() - - add_executable(${test_name} ${test_name}.${ext} ${DRIVERS}) - if (BUILD_RPATH) - if (BUILD_STATIC_EXE) - set_target_properties(${test_name} - PROPERTIES INSTALL_RPATH "" - INSTALL_RPATH_USE_LINK_PATH FALSE) - target_link_libraries(${test_name} ${LINK_LIBS_STATIC}) - else () - set_target_properties(${test_name} - PROPERTIES INSTALL_RPATH "${INSTALL_RPATH_DIRS}" - INSTALL_RPATH_USE_LINK_PATH TRUE) - target_link_libraries(${test_name} ${LINK_LIBS_SHARED}) - endif () + if( NOT $BUILD_EXE) + message(STATUS "Skiping ${test_name} unit tests build") else () - if (BUILD_STATIC_EXE) - target_link_libraries(${test_name} ${LINK_LIBS_STATIC}) + message(STATUS "Building unit tests: ${test_name}") + + list(APPEND LINK_LIBS gtest) + + dagmc_get_link_libs() + + add_executable(${test_name} ${test_name}.${ext} ${DRIVERS}) + if (BUILD_RPATH) + if (BUILD_STATIC_EXE) + set_target_properties(${test_name} + PROPERTIES INSTALL_RPATH "" + INSTALL_RPATH_USE_LINK_PATH FALSE) + target_link_libraries(${test_name} ${LINK_LIBS_STATIC}) + else () + set_target_properties(${test_name} + PROPERTIES INSTALL_RPATH "${INSTALL_RPATH_DIRS}" + INSTALL_RPATH_USE_LINK_PATH TRUE) + target_link_libraries(${test_name} ${LINK_LIBS_SHARED}) + endif () else () - target_link_libraries(${test_name} ${LINK_LIBS_SHARED}) + if (BUILD_STATIC_EXE) + target_link_libraries(${test_name} ${LINK_LIBS_STATIC}) + else () + target_link_libraries(${test_name} ${LINK_LIBS_SHARED}) + endif () endif () + install(TARGETS ${test_name} DESTINATION ${INSTALL_TESTS_DIR}) + add_test(NAME ${test_name} COMMAND ${test_name}) + set_property(TEST ${test_name} PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=''") endif () - install(TARGETS ${test_name} DESTINATION ${INSTALL_TESTS_DIR}) - add_test(NAME ${test_name} COMMAND ${test_name}) - set_property(TEST ${test_name} PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=''") endmacro () # Install a file needed for unit testing From eb698b44e403847adcecb6fc19e44b667ca601d8 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Mon, 21 Dec 2020 10:43:13 -0600 Subject: [PATCH 02/10] this should be ok --- cmake/DAGMC_macros.cmake | 74 +++++++++++----------------------------- 1 file changed, 19 insertions(+), 55 deletions(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index 78a3f01939..4163882d66 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -66,14 +66,12 @@ macro (dagmc_setup_options) option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(BUILD_STATIC_LIBS "Build static libraries" ON) - option(BUILD_STATIC_EXE "Build static executables" OFF) option(BUILD_EXE "Build DAGMC executables" ON) + option(BUILD_STATIC_EXE "Build static executables" OFF) option(BUILD_PIC "Build with PIC" OFF) option(BUILD_RPATH "Build libraries and executables with RPATH" ON) - option(DOUBLE_DOWN "Enable ray tracing with Embree via double down" OFF) - if (BUILD_ALL) set(BUILD_MCNP5 ON) set(BUILD_MCNP6 ON) @@ -81,19 +79,6 @@ macro (dagmc_setup_options) set(BUILD_FLUKA ON) endif () - if (DOUBLE_DOWN AND BUILD_STATIC_LIBS) - message(WARNING "DOUBLE_DOWN is enabled but will only be applied to the shared DAGMC library") - endif() - - if (DOUBLE_DOWN AND BUILD_STATIC_EXE) - message(WARNING "DOUBLE_DOWN is enabled but will only be applied to executables using the DAGMC shared library") - endif() - -if (DOUBLE_DOWN) - find_package(DOUBLE_DOWN REQUIRED) -endif() - - if (NOT BUILD_STATIC_LIBS AND BUILD_STATIC_EXE) message(FATAL_ERROR "BUILD_STATIC_EXE cannot be ON while BUILD_STATIC_LIBS is OFF") endif () @@ -101,7 +86,8 @@ endif() message(FATAL_ERROR "BUILD_SHARED_LIBS and BUILD_STATIC_LIBS cannot both be OFF") endif () if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_EXE AND BUILD_EXE) - message("Turning BUILD_EXE to OFF: SHARED_BUIL_LIBS and BUILD_STATIC_EXE are OFF") + SET(BUILD_EXE OFF) + message("Turning BUILD_EXE to OFF: SHARED_BUIL_LIBS and BUILD_STATIC_EXE are OFF") endif () endmacro () @@ -218,18 +204,13 @@ macro (dagmc_install_library lib_name) add_library(${lib_name}-shared SHARED ${SRC_FILES}) set_target_properties(${lib_name}-shared PROPERTIES OUTPUT_NAME ${lib_name} - PUBLIC_HEADER "${PUB_HEADERS}") + PUBLIC_HEADER "${PUB_HEADERS}") if (BUILD_RPATH) set_target_properties(${lib_name}-shared PROPERTIES INSTALL_RPATH "${INSTALL_RPATH_DIRS}" INSTALL_RPATH_USE_LINK_PATH TRUE) endif () - message("LINK LIBS: ${LINK_LIBS_SHARED}") - target_link_libraries(${lib_name}-shared PUBLIC ${LINK_LIBS_SHARED}) - if (DOUBLE_DOWN) - target_compile_definitions(${lib_name}-shared PRIVATE DOUBLE_DOWN) - target_link_libraries(${lib_name}-shared PUBLIC dd) - endif() + target_link_libraries(${lib_name}-shared ${LINK_LIBS_SHARED}) target_include_directories(${lib_name}-shared INTERFACE $ ${MOAB_INCLUDE_DIRS}) install(TARGETS ${lib_name}-shared @@ -262,33 +243,13 @@ endmacro () # Install an executable macro (dagmc_install_exe exe_name) -<<<<<<< HEAD - message(STATUS "Building executable: ${exe_name}") - - dagmc_get_link_libs() - - add_executable(${exe_name} ${SRC_FILES}) - if (BUILD_RPATH) - if (BUILD_STATIC_EXE) - set_target_properties(${exe_name} - PROPERTIES INSTALL_RPATH "" - INSTALL_RPATH_USE_LINK_PATH FALSE) - target_link_libraries(${exe_name} ${LINK_LIBS_STATIC}) - else () - set_target_properties(${exe_name} - PROPERTIES INSTALL_RPATH "${INSTALL_RPATH_DIRS}" - INSTALL_RPATH_USE_LINK_PATH TRUE) - target_link_libraries(${exe_name} PUBLIC ${LINK_LIBS_SHARED}) - endif () -======= - if( NOT $BUILD_EXE) - message(STATUS "Skiping executable ${exe_name} build") ->>>>>>> adding build_exe option to cmake + if (NOT BUILD_EXE) + message(STATUS "Skipping executable ${exe_name} build") else () message(STATUS "Building executable: ${exe_name}") - + dagmc_get_link_libs() - + add_executable(${exe_name} ${SRC_FILES}) if (BUILD_RPATH) if (BUILD_STATIC_EXE) @@ -303,23 +264,26 @@ macro (dagmc_install_exe exe_name) target_link_libraries(${exe_name} ${LINK_LIBS_SHARED}) endif () else () - target_link_libraries(${exe_name} PUBLIC ${LINK_LIBS_SHARED}) + if (BUILD_STATIC_EXE) + target_link_libraries(${exe_name} ${LINK_LIBS_STATIC}) + else () + target_link_libraries(${exe_name} ${LINK_LIBS_SHARED}) + endif () endif () install(TARGETS ${exe_name} DESTINATION ${INSTALL_BIN_DIR}) - endif() + endif () endmacro () # Install a unit test macro (dagmc_install_test test_name ext) - if( NOT $BUILD_EXE) - message(STATUS "Skiping ${test_name} unit tests build") + if (NOT BUILD_EXEC) + message(STATUS "Skipping unit tests ${test_name} build.") else () message(STATUS "Building unit tests: ${test_name}") - list(APPEND LINK_LIBS gtest) - + dagmc_get_link_libs() - + add_executable(${test_name} ${test_name}.${ext} ${DRIVERS}) if (BUILD_RPATH) if (BUILD_STATIC_EXE) From 94d4d71e60a7166b190b2b62e0ae0ed833861372 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Mon, 21 Dec 2020 10:49:31 -0600 Subject: [PATCH 03/10] now on top of the last version of Develop... --- cmake/DAGMC_macros.cmake | 38 ++++++++++++++++++++++++++++++-------- 1 file changed, 30 insertions(+), 8 deletions(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index 4163882d66..133ec762d2 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -72,6 +72,8 @@ macro (dagmc_setup_options) option(BUILD_RPATH "Build libraries and executables with RPATH" ON) + option(DOUBLE_DOWN "Enable ray tracing with Embree via double down" OFF) + if (BUILD_ALL) set(BUILD_MCNP5 ON) set(BUILD_MCNP6 ON) @@ -79,6 +81,19 @@ macro (dagmc_setup_options) set(BUILD_FLUKA ON) endif () + if (DOUBLE_DOWN AND BUILD_STATIC_LIBS) + message(WARNING "DOUBLE_DOWN is enabled but will only be applied to the shared DAGMC library") + endif() + + if (DOUBLE_DOWN AND BUILD_STATIC_EXE) + message(WARNING "DOUBLE_DOWN is enabled but will only be applied to executables using the DAGMC shared library") + endif() + +if (DOUBLE_DOWN) + find_package(DOUBLE_DOWN REQUIRED) +endif() + + if (NOT BUILD_STATIC_LIBS AND BUILD_STATIC_EXE) message(FATAL_ERROR "BUILD_STATIC_EXE cannot be ON while BUILD_STATIC_LIBS is OFF") endif () @@ -86,9 +101,10 @@ macro (dagmc_setup_options) message(FATAL_ERROR "BUILD_SHARED_LIBS and BUILD_STATIC_LIBS cannot both be OFF") endif () if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_EXE AND BUILD_EXE) - SET(BUILD_EXE OFF) + SET(BUILD_EXE OFF) message("Turning BUILD_EXE to OFF: SHARED_BUIL_LIBS and BUILD_STATIC_EXE are OFF") endif () + endmacro () macro (dagmc_setup_flags) @@ -115,7 +131,7 @@ macro (dagmc_setup_flags) set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "") set(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "") - if(BUILD_EXE) + if (BUILD_EXE) if (BUILD_STATIC_EXE) message(STATUS "Building static executables") set(BUILD_SHARED_EXE OFF) @@ -132,7 +148,7 @@ macro (dagmc_setup_flags) set(BUILD_SHARED_EXE ON) set(CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_SHARED_LIBRARY_SUFFIX}) endif () - endif() + endif () if (BUILD_RPATH) if (CMAKE_INSTALL_RPATH) @@ -204,13 +220,18 @@ macro (dagmc_install_library lib_name) add_library(${lib_name}-shared SHARED ${SRC_FILES}) set_target_properties(${lib_name}-shared PROPERTIES OUTPUT_NAME ${lib_name} - PUBLIC_HEADER "${PUB_HEADERS}") + PUBLIC_HEADER "${PUB_HEADERS}") if (BUILD_RPATH) set_target_properties(${lib_name}-shared PROPERTIES INSTALL_RPATH "${INSTALL_RPATH_DIRS}" INSTALL_RPATH_USE_LINK_PATH TRUE) endif () - target_link_libraries(${lib_name}-shared ${LINK_LIBS_SHARED}) + message("LINK LIBS: ${LINK_LIBS_SHARED}") + target_link_libraries(${lib_name}-shared PUBLIC ${LINK_LIBS_SHARED}) + if (DOUBLE_DOWN) + target_compile_definitions(${lib_name}-shared PRIVATE DOUBLE_DOWN) + target_link_libraries(${lib_name}-shared PUBLIC dd) + endif() target_include_directories(${lib_name}-shared INTERFACE $ ${MOAB_INCLUDE_DIRS}) install(TARGETS ${lib_name}-shared @@ -261,13 +282,13 @@ macro (dagmc_install_exe exe_name) set_target_properties(${exe_name} PROPERTIES INSTALL_RPATH "${INSTALL_RPATH_DIRS}" INSTALL_RPATH_USE_LINK_PATH TRUE) - target_link_libraries(${exe_name} ${LINK_LIBS_SHARED}) + target_link_libraries(${exe_name} PUBLIC ${LINK_LIBS_SHARED}) endif () else () if (BUILD_STATIC_EXE) target_link_libraries(${exe_name} ${LINK_LIBS_STATIC}) else () - target_link_libraries(${exe_name} ${LINK_LIBS_SHARED}) + target_link_libraries(${exe_name} PUBLIC ${LINK_LIBS_SHARED}) endif () endif () install(TARGETS ${exe_name} DESTINATION ${INSTALL_BIN_DIR}) @@ -280,6 +301,7 @@ macro (dagmc_install_test test_name ext) message(STATUS "Skipping unit tests ${test_name} build.") else () message(STATUS "Building unit tests: ${test_name}") + list(APPEND LINK_LIBS gtest) dagmc_get_link_libs() @@ -307,7 +329,7 @@ macro (dagmc_install_test test_name ext) install(TARGETS ${test_name} DESTINATION ${INSTALL_TESTS_DIR}) add_test(NAME ${test_name} COMMAND ${test_name}) set_property(TEST ${test_name} PROPERTY ENVIRONMENT "LD_LIBRARY_PATH=''") - endif () +endif () endmacro () # Install a file needed for unit testing From c1f317e00aaa92a1d38b8678579d288cac12992f Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Mon, 21 Dec 2020 10:52:45 -0600 Subject: [PATCH 04/10] adding news --- news/PR-0717.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 news/PR-0717.rst diff --git a/news/PR-0717.rst b/news/PR-0717.rst new file mode 100644 index 0000000000..e8e17966f6 --- /dev/null +++ b/news/PR-0717.rst @@ -0,0 +1,13 @@ +**Added:** +- adding BUILD_EXE option (default ON) alowing to build only the dagmc libs + without the executable (for static and/or shared libs) + +**Changed:** None + +**Deprecated:** None + +**Removed:** None + +**Fixed:** None + +**Security:** None From dbf0209370d2c9e4fcf58d139bf4fb59e2f81eff Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Mon, 21 Dec 2020 10:58:31 -0600 Subject: [PATCH 05/10] BUILD_EXEC -> BUILD_EXE --- cmake/DAGMC_macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index 133ec762d2..e7c0f97261 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -297,7 +297,7 @@ endmacro () # Install a unit test macro (dagmc_install_test test_name ext) - if (NOT BUILD_EXEC) + if (NOT BUILD_EXE) message(STATUS "Skipping unit tests ${test_name} build.") else () message(STATUS "Building unit tests: ${test_name}") From 030faf6d9ead61684ddc70e95ed64cf19b0a8f7d Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Mon, 21 Dec 2020 12:20:29 -0600 Subject: [PATCH 06/10] add header to static install --- cmake/DAGMC_macros.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index e7c0f97261..be00d91bf9 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -243,7 +243,8 @@ macro (dagmc_install_library lib_name) if (BUILD_STATIC_LIBS) add_library(${lib_name}-static STATIC ${SRC_FILES}) set_target_properties(${lib_name}-static - PROPERTIES OUTPUT_NAME ${lib_name}) + PROPERTIES OUTPUT_NAME ${lib_name} + PUBLIC_HEADER "${PUB_HEADERS}") if (BUILD_RPATH) set_target_properties(${lib_name}-static PROPERTIES INSTALL_RPATH "" INSTALL_RPATH_USE_LINK_PATH FALSE) From fa6c50da559aa125185eabd1698b080b6036c673 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Mon, 21 Dec 2020 12:21:18 -0600 Subject: [PATCH 07/10] udating news --- news/PR-0717.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/news/PR-0717.rst b/news/PR-0717.rst index e8e17966f6..58bd6e8a3f 100644 --- a/news/PR-0717.rst +++ b/news/PR-0717.rst @@ -3,7 +3,7 @@ without the executable (for static and/or shared libs) **Changed:** None - +- now install dagmc header when building and instaling static libs **Deprecated:** None **Removed:** None From 0e89529eea5e68de006233a64b82f431bf8306a5 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot <15145274+bam241@users.noreply.github.com> Date: Wed, 20 Jan 2021 17:29:57 -0600 Subject: [PATCH 08/10] Apply suggestions from code review Co-authored-by: Patrick Shriwise --- cmake/DAGMC_macros.cmake | 2 +- news/PR-0717.rst | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index be00d91bf9..eac36416c4 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -102,7 +102,7 @@ endif() endif () if (NOT BUILD_SHARED_LIBS AND NOT BUILD_STATIC_EXE AND BUILD_EXE) SET(BUILD_EXE OFF) - message("Turning BUILD_EXE to OFF: SHARED_BUIL_LIBS and BUILD_STATIC_EXE are OFF") + message("Turning BUILD_EXE OFF: SHARED_BUILD_LIBS and BUILD_STATIC_EXE are OFF") endif () endmacro () diff --git a/news/PR-0717.rst b/news/PR-0717.rst index 58bd6e8a3f..90b1c92107 100644 --- a/news/PR-0717.rst +++ b/news/PR-0717.rst @@ -1,9 +1,12 @@ **Added:** + - adding BUILD_EXE option (default ON) alowing to build only the dagmc libs without the executable (for static and/or shared libs) **Changed:** None + - now install dagmc header when building and instaling static libs + **Deprecated:** None **Removed:** None From cd5eeb8cd2dc295de7015ac57e44b38922f6b097 Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Thu, 21 Jan 2021 11:31:47 -0600 Subject: [PATCH 09/10] alignement --- cmake/DAGMC_macros.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index eac36416c4..101822c15f 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -53,12 +53,12 @@ macro (dagmc_setup_options) option(BUILD_FLUKA "Build FluDAG" OFF) - option(BUILD_UWUW "Build UWUW library and uwuw_preproc" ON) + option(BUILD_UWUW "Build UWUW library and uwuw_preproc" ON) option(BUILD_TALLY "Build dagtally library" ON) option(BUILD_BUILD_OBB "Build build_obb tool" ON) option(BUILD_MAKE_WATERTIGHT "Build make_watertight tool" ON) - option(BUILD_OVERLAP_CHECK "Build overlap_check tool" ON) + option(BUILD_OVERLAP_CHECK "Build overlap_check tool" ON) option(BUILD_TESTS "Build unit tests" ON) option(BUILD_CI_TESTS "Build everything needed to run the CI tests" OFF) @@ -66,7 +66,7 @@ macro (dagmc_setup_options) option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(BUILD_STATIC_LIBS "Build static libraries" ON) - option(BUILD_EXE "Build DAGMC executables" ON) + option(BUILD_EXE i "Build DAGMC executables" ON) option(BUILD_STATIC_EXE "Build static executables" OFF) option(BUILD_PIC "Build with PIC" OFF) From 39d28d1e90f61be901f9a1e01fbd078bb9c255fc Mon Sep 17 00:00:00 2001 From: Baptiste Mouginot Date: Tue, 2 Feb 2021 10:03:00 -0600 Subject: [PATCH 10/10] that should be better without typo --- cmake/DAGMC_macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index 101822c15f..241f429930 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -66,7 +66,7 @@ macro (dagmc_setup_options) option(BUILD_SHARED_LIBS "Build shared libraries" ON) option(BUILD_STATIC_LIBS "Build static libraries" ON) - option(BUILD_EXE i "Build DAGMC executables" ON) + option(BUILD_EXE "Build DAGMC executables" ON) option(BUILD_STATIC_EXE "Build static executables" OFF) option(BUILD_PIC "Build with PIC" OFF)