From d4342e8ae79eab528bed58d683a72c1323da525c Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 5 Oct 2009 16:51:11 -0400 Subject: [PATCH] Fortran test: Match config for external project In the Fortran test we use a custom command to build another Fortran project internally. The project provides a Fortran module and library to which to link. This commit teaches the test to build the extra project using the same build configuration as the main project. --- Tests/Fortran/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index 7f5ed21a3..adcadd4dc 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -149,8 +149,10 @@ if(TEST_MODULE_DEPENDS) # Make sure it uses the same build configuration as this test. if(CMAKE_CONFIGURATION_TYPES) set(External_CONFIG_TYPE -C "${CMAKE_CFG_INTDIR}") + set(External_BUILD_TYPE) else(CMAKE_CONFIGURATION_TYPES) set(External_CONFIG_TYPE) + set(External_BUILD_TYPE -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE}) endif(CMAKE_CONFIGURATION_TYPES) add_custom_command( OUTPUT ${testf_BINARY_DIR}/ExternalProject @@ -170,6 +172,7 @@ if(TEST_MODULE_DEPENDS) -DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE} -DCMAKE_Fortran_FLAGS_MINSIZEREL:STRING=${CMAKE_Fortran_FLAGS_MINSIZEREL} -DCMAKE_Fortran_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_Fortran_FLAGS_RELWITHDEBINFO} + ${External_BUILD_TYPE} ) add_custom_target(ExternalTarget ALL DEPENDS ${testf_BINARY_DIR}/ExternalProject)