Commit 9fa628d7 authored by Manuel Günther's avatar Manuel Günther
Browse files

Added default compile flags to be RELEASE flags.

parent 1cc7229b
......@@ -3,7 +3,7 @@ import os
HEADER = (
'\n'
'# For both C and C++\n'
'set(COMMON_FLAGS "-pedantic -Wall $ENV{CFLAGS}")\n'
'set(COMMON_FLAGS "-pedantic -Wall")\n'
'if (WIN32)\n'
' set(COMMON_FLAGS "-D_WIN32_WINNT=0x501") # Set min. Windows version to XP\n'
'else(WIN32)\n'
......@@ -94,6 +94,12 @@ class CMakeListsGenerator:
def generate(self, directory):
"""Generates the CMakeLists.txt file in the given directory."""
# check if CFLAGS or CXXFLAGS are set, and set them if not
if 'CFLAGS' not in os.environ:
os.environ['CFLAGS'] = '-O3 -g0 -DNDEBUG -mtune=generic'
if 'CXXFLAGS' not in os.environ:
os.environ['CXXFLAGS'] = '-O3 -g0 -DNDEBUG -mtune=generic'
filename = os.path.join(directory, "CMakeLists.txt")
with open(filename, 'w') as f:
f.write('# WARNING! This file is automatically generated. Do not change its contents.\n\n')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment