Here is a simple CMakeList.txt:
# ====================================================[
cmake_minimum_required(VERSION 2.8)
project(vectorcast)
if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
set(LINUX64 1)
else()
set(LINUX32 1)
endif()
endif()
if ((${CMAKE_SYSTEM_NAME} MATCHES "SunOS") or (DEFINED LINUX64))
message(STATUS "On Solaris or 64 bit Linux")
endif()
# ====================================================[
I'm using cmake version 2.8.11.2 built from source on
Linux localhost.localdomain 2.6.18-8.el5 #1 SMP Thu Mar 15 19:46:53 EDT
2007 x86_64 x86_64 x86_64 GNU/Linux
This doesn't work. I get this error message is:
CMake Error at CMakeLists.txt:12 (if):
if given arguments:
"(" "Linux" "MATCHES" "SunOS" ")" "or" "(" "DEFINED" "LINUX64" ")"
Unknown arguments specified
What am I doing wrong? Is this syntax not supported until the 3.x series?
Thanks,
Tom
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake