summaryrefslogtreecommitdiffstats
path: root/Tests/CMakeLists.txt
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2011-08-03 21:24:43 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2011-08-03 21:24:43 (GMT)
commit3c53fbb1f0d7276d0ef1f07facb2a1d937fc5153 (patch)
treef73fa1e39ea2396eb041ce680d67d4bd15cd5486 /Tests/CMakeLists.txt
parent6c72d25aee92c6cd412c79969b7b18a814ac99cb (diff)
downloadCMake-3c53fbb1f0d7276d0ef1f07facb2a1d937fc5153.zip
CMake-3c53fbb1f0d7276d0ef1f07facb2a1d937fc5153.tar.gz
CMake-3c53fbb1f0d7276d0ef1f07facb2a1d937fc5153.tar.bz2
Fix custom commands in VS2010 Fortran projects using CFG_INTDIR and test.
For custom commands in VS2010 Fortran projects the INTDIR variable is different than in the rest of the solution because Intel fortran still uses the old VS project files even in VS2010. So, we replace $(Configuration) directly in the project files. I have also added a FortranOnly test that tests this feature and is run on any generator that has Fortran abilities.
Diffstat (limited to 'Tests/CMakeLists.txt')
-rw-r--r--Tests/CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 2ad9a77..da4eda0 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -16,6 +16,8 @@ MACRO(ADD_TEST_MACRO NAME COMMAND)
LIST(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/${dir}")
ENDMACRO(ADD_TEST_MACRO)
+INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CheckFortran.cmake)
+
# Fake a user home directory to avoid polluting the real one.
IF(DEFINED ENV{HOME} AND NOT CTEST_NO_TEST_HOME)
SET(TEST_HOME "${CMake_BINARY_DIR}/Tests/CMakeFiles/TestHome")
@@ -155,6 +157,9 @@ IF(BUILD_TESTING)
ADD_TEST_MACRO(MissingSourceFile MissingSourceFile)
SET_TESTS_PROPERTIES(MissingSourceFile PROPERTIES
PASS_REGULAR_EXPRESSION "CMake Error at CMakeLists.txt:3 \\(add_executable\\):[ \r\n]*Cannot find source file:[ \r\n]*DoesNotExist/MissingSourceFile.c")
+ IF(CMAKE_Fortran_COMPILER)
+ ADD_TEST_MACRO(FortranOnly FortranOnly)
+ ENDIF()
ADD_TEST_MACRO(COnly COnly)
ADD_TEST_MACRO(CxxOnly CxxOnly)
ADD_TEST_MACRO(IPO COnly/COnly)
@@ -1879,7 +1884,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
# fortran does not work for IDE builds because
# CMAKE_STANDARD_LIBRARIES needs to be per language
IF(CMAKE_TEST_GENERATOR MATCHES "Make|KDevelop")
- INCLUDE(${CMAKE_CURRENT_SOURCE_DIR}/CheckFortran.cmake)
IF(CMAKE_Fortran_COMPILER)
ADD_TEST(Fortran ${CMAKE_CTEST_COMMAND}
--build-and-test