CMakeLists.txt 1.36 KB
Newer Older
1
2
project(testdatacreation)
  include_directories(${AMDiS_SOURCE_DIR})
3
4
  include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../demoimpl/src)
  file(GLOB PROJECTFILES ${CMAKE_CURRENT_SOURCE_DIR}/../demoimpl/src/*Project.cpp)
5
  set(CREATELINE "")
6
7
  foreach(projectfile ${PROJECTFILES})
  	#create creatorname
8
  	get_filename_component(CppName ${projectfile} NAME_WE)
9
  	string(REPLACE "Project" "" creatorsuffix ${CppName})
10
	set(PROJECTINCLUDE "${CMAKE_CURRENT_SOURCE_DIR}/../demoimpl/src/${CppName}.h")
11
12
13
	set(CURRENTPROJECTTYPE "${creatorsuffix}demo")
	string(TOLOWER "${creatorsuffix}" creatorsuffix_lower)
	set(BASENAME "${creatorsuffix_lower}")
14
	configure_file(src/creator_base.cpp src/creator${creatorsuffix}.cpp @ONLY)
15
  	add_executable(creator${creatorsuffix} src/creator${creatorsuffix}.cpp src/ProjectList.cpp)
16
	target_link_libraries(creator${creatorsuffix} ${AMDiS_LIBS} demoimpl)
17
18
19
20
21
22
23
	file(GLOB initfiles RELATIVE ${CMAKE_CURRENT_BINARY_DIR} init/${creatorsuffix_lower}*.dat*)
	foreach(initfile ${initfiles})
		get_filename_component(initfile_ext ${initfile} EXT)
		string(REPLACE ".dat." "" initfile_ext "${initfile_ext}")
		set(curoutputdatafile "../testdata/${creatorsuffix_lower}_${initfile_ext}.arh")
		set(CREATELINE "${CREATELINE}./creator${creatorsuffix} ${initfile} ${curoutputdatafile}\n")
	endforeach(initfile)
24
  endforeach(projectfile)
25
  configure_file(create_base.sh create.sh)