summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2015-12-06 10:18:38 +0100
committerMatthias Braun <matze@braunis.de>2015-12-06 10:37:55 +0100
commit209a7455b122ddb5ff4ad6753a178dc791a49e2c (patch)
treea7b1c11b79b83a7ea379ac6e268d3a85e9b8fd29 /CMakeLists.txt
parent1e3ca962dc437f61b5a2ac5ef0a29f034093ce18 (diff)
CMakeLists.txt: Small improvements
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1f0d1b7..7c8f530 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,13 +5,13 @@ endif()
if(POLICY CMP0028)
cmake_policy(SET CMP0028 NEW)
endif()
-project(cparser)
+project(cparser C)
set(cparser_VERSION "1.22.0")
# Enable C99
if(CMAKE_VERSION VERSION_LESS "3.1")
if(CMAKE_C_COMPILER_ID STREQUAL "GNU")
- set(CMAKE_C_FLAGS "--std=gnu99 ${CMAKE_C_FLAGS}")
+ set(CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}")
endif()
else()
set(CMAKE_C_STANDARD 99)
@@ -62,7 +62,8 @@ set(SOURCES
)
include_directories(src)
-find_package(libfirm REQUIRED)
+# Need libfirm of the same version as cparser
+find_package(libfirm ${cparser_VERSION} REQUIRED)
include_directories(${libfirm_INCLUDE_DIRS})
add_executable(cparser ${SOURCES})