less hidden assumptions

This commit is contained in:
Radovan Bast 2015-06-04 13:53:46 +02:00
parent 6c6f779b2d
commit ea10164306
5 changed files with 15 additions and 8 deletions

View File

@ -0,0 +1,2 @@
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)

1
modules/src.cmake Normal file
View File

@ -0,0 +1 @@
add_subdirectory(${PROJECT_SOURCE_DIR}/src)

View File

@ -5,3 +5,9 @@ name: example
source: https://github.com/scisoft/autocmake/raw/master/modules/cxx.cmake
docopt: --cxx=<CXX> C++ compiler [default: g++].
export: 'CXX=%s' % arguments['--cxx']
[default_build_paths]
source: https://github.com/scisoft/autocmake/raw/master/modules/default_build_paths.cmake
[src]
source: https://github.com/scisoft/autocmake/raw/master/modules/src.cmake

View File

@ -5,3 +5,9 @@ name: example
source: https://github.com/scisoft/autocmake/raw/master/modules/fc.cmake
docopt: --fc=<FC> Fortran compiler [default: gfortran].
export: 'FC=%s' % arguments['--fc']
[default_build_paths]
source: https://github.com/scisoft/autocmake/raw/master/modules/default_build_paths.cmake
[src]
source: https://github.com/scisoft/autocmake/raw/master/modules/src.cmake

View File

@ -182,11 +182,6 @@ def gen_cmakelists(config, relative_path, list_of_modules):
s.append('# places during configuration and build')
s.append('find_package(PythonInterp REQUIRED)')
s.append('\n')
s.append('# default paths')
s.append('set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)')
s.append('set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)')
s.append('\n')
s.append('# determine program version from file, example: "14.1"')
s.append('# the reason why this information is stored')
@ -213,9 +208,6 @@ def gen_cmakelists(config, relative_path, list_of_modules):
for m in list_of_modules:
s.append('include(autocmake_%s)' % os.path.splitext(m)[0])
s.append('\n')
s.append('add_subdirectory(${PROJECT_SOURCE_DIR}/src)')
return s