[Orxonox-commit 4175] r8846 - code/branches/output
rgrieder at orxonox.net
rgrieder at orxonox.net
Mon Aug 15 00:03:50 CEST 2011
Author: rgrieder
Date: 2011-08-15 00:03:50 +0200 (Mon, 15 Aug 2011)
New Revision: 8846
Modified:
code/branches/output/CMakeLists.txt
Log:
The CMake version check should be placed AFTER the PROJECT command to allow for definitions like MSVC10 to happen.
Modified: code/branches/output/CMakeLists.txt
===================================================================
--- code/branches/output/CMakeLists.txt 2011-08-14 20:58:07 UTC (rev 8845)
+++ code/branches/output/CMakeLists.txt 2011-08-14 22:03:50 UTC (rev 8846)
@@ -28,6 +28,16 @@
SET(LINUX TRUE)
ENDIF()
+# Keep devs from using the root directory as binary directory (messes up the source tree)
+IF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
+ MESSAGE(FATAL_ERROR "Please do not use the root directory as CMake output directory!
+ mkdir build; cd build; cmake ..
+ And you will have to clean the source directory by deleting CMakeCache.txt and the folder CMakeFiles")
+ENDIF()
+
+PROJECT(Orxonox C CXX)
+
+# Check AFTER the PROJECT command because MSVC10 gets defined there
IF(WIN32)
IF(MSVC10)
CMAKE_MINIMUM_REQUIRED(VERSION 2.8.3 FATAL_ERROR)
@@ -38,15 +48,6 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
ENDIF()
-# Keep devs from using the root directory as binary directory (messes up the source tree)
-IF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
- MESSAGE(FATAL_ERROR "Please do not use the root directory as CMake output directory!
- mkdir build; cd build; cmake ..
- And you will have to clean the source directory by deleting CMakeCache.txt and the folder CMakeFiles")
-ENDIF()
-
-PROJECT(Orxonox C CXX)
-
################ General Config #################
# Version info
More information about the Orxonox-commit
mailing list