summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-10-05 20:51:11 (GMT)
committerBrad King <brad.king@kitware.com>2009-10-05 20:51:11 (GMT)
commitd4342e8ae79eab528bed58d683a72c1323da525c (patch)
treec4e508121db6bc9262191dde68b35542c8bab632
parentb3611f70ae67a64e92cd0363e46b76188a54a09c (diff)
downloadCMake-d4342e8ae79eab528bed58d683a72c1323da525c.zip
CMake-d4342e8ae79eab528bed58d683a72c1323da525c.tar.gz
CMake-d4342e8ae79eab528bed58d683a72c1323da525c.tar.bz2
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.
-rw-r--r--Tests/Fortran/CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt
index 7f5ed21..adcadd4 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)