test automatic config specification

This commit is contained in:
Radovan Bast 2015-07-17 16:21:50 +02:00
parent 66db064fa6
commit a2e1e243db
4 changed files with 29 additions and 0 deletions

View File

@ -0,0 +1,14 @@
[project]
name: example
[cxx]
source: ../../../modules/cxx.cmake
auto: true
[default_build_paths]
source: ../../../modules/default_build_paths.cmake
auto: true
[src]
source: ../../../modules/src.cmake
auto: true

View File

@ -0,0 +1 @@
add_executable(example example.cpp)

View File

@ -0,0 +1,7 @@
#include <iostream>
int main()
{
std::cout << "Hello World!";
return 0;
}

View File

@ -114,6 +114,13 @@ def test_cxx():
# ------------------------------------------------------------------------------
def test_cxx_auto():
stdout, stderr = configure_build_and_exe('cxx_auto', 'python setup.py --cxx=g++')
assert 'Hello World!' in stdout
# ------------------------------------------------------------------------------
def test_fc():
stdout, stderr = configure_build_and_exe('fc', 'python setup.py --fc=gfortran')
assert 'Hello World!' in stdout