Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8846


Ignore:
Timestamp:
Aug 15, 2011, 12:03:50 AM (13 years ago)
Author:
rgrieder
Message:

The CMake version check should be placed AFTER the PROJECT command to allow for definitions like MSVC10 to happen.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/output/CMakeLists.txt

    r8474 r8846  
    2929ENDIF()
    3030
     31# Keep devs from using the root directory as binary directory (messes up the source tree)
     32IF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
     33  MESSAGE(FATAL_ERROR "Please do not use the root directory as CMake output directory!
     34  mkdir build; cd build; cmake ..
     35  And you will have to clean the source directory by deleting CMakeCache.txt and the folder CMakeFiles")
     36ENDIF()
     37
     38PROJECT(Orxonox C CXX)
     39
     40# Check AFTER the PROJECT command because MSVC10 gets defined there
    3141IF(WIN32)
    3242  IF(MSVC10)
     
    3848  CMAKE_MINIMUM_REQUIRED(VERSION 2.6 FATAL_ERROR)
    3949ENDIF()
    40 
    41 # Keep devs from using the root directory as binary directory (messes up the source tree)
    42 IF(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR})
    43   MESSAGE(FATAL_ERROR "Please do not use the root directory as CMake output directory!
    44   mkdir build; cd build; cmake ..
    45   And you will have to clean the source directory by deleting CMakeCache.txt and the folder CMakeFiles")
    46 ENDIF()
    47 
    48 PROJECT(Orxonox C CXX)
    4950
    5051################ General Config #################
Note: See TracChangeset for help on using the changeset viewer.