Added common recipe for building CMake projects. And added Catch2 recipe.

This commit is contained in:
2023-08-06 13:41:01 +02:00
parent 1988bcc99b
commit d1c48fbd8a
6 changed files with 70 additions and 89 deletions

View File

@@ -206,6 +206,13 @@ env['UNITY_CACHE_DIR'] = Dir(f'{env["CACHE_DIR"]}/unity')
env['BUILD_TYPE'] = build_type
env.Append(LIBPATH = [env['LIB_DIR']]) # to allow submodules to link to each other without hassle
# make sure these are all defined in case someone wants to use/copy them
env.Append(CCFLAGS = [])
env.Append(CXXFLAGS = [])
env.Append(CPPPATH = [])
env.Append(CPPDEFINES = [])
env.Append(LINKFLAGS = [])
# create the cache dir
os.makedirs(env['CACHE_DIR'], exist_ok=True)
cache_gitignore = f'{env["CACHE_DIR"]}/.gitignore'