lemon-project-template-glpk

changeset 7:c941f748eaa8

Move sources to src/
author Alpar Juttner <alpar@cs.elte.hu>
date Tue, 22 Mar 2011 20:09:43 +0100
parents b995b17cd52b
children dda9b6665fde
files CMakeLists.txt main.cc src/CMakeLists.txt src/main.cc
diffstat 4 files changed, 56 insertions(+), 44 deletions(-) [+]
line diff
     1.1 --- a/CMakeLists.txt	Tue Mar 22 19:51:48 2011 +0100
     1.2 +++ b/CMakeLists.txt	Tue Mar 22 20:09:43 2011 +0100
     1.3 @@ -61,24 +61,7 @@
     1.4    ${LEMON_INCLUDE_DIRS}
     1.5  )
     1.6  
     1.7 -## Here we define an executable target. Its name is 'lemon-project' and
     1.8 -## is compiled from 'main.cc'. You can add more source files separated
     1.9 -## with whitespaces (including newlines). If you want to build more
    1.10 -## executables, simple repeat (and edit) the following ADD_EXECUTABLE and
    1.11 -## TARGET_LINK_LIBRARIES statements.
    1.12 -
    1.13 -ADD_EXECUTABLE(lemon-project main.cc)
    1.14 -TARGET_LINK_LIBRARIES(lemon-project ${LEMON_LIBRARIES})
    1.15 -
    1.16 -## This tells cmake to install 'lemon-project' to $PREFIX/bin when
    1.17 -## 'make install' is executed. You can give more targets separated
    1.18 -## by whitespaces.
    1.19 -
    1.20 -INSTALL(
    1.21 -  TARGETS lemon-project
    1.22 -  RUNTIME DESTINATION bin
    1.23 -  COMPONENT bin
    1.24 -)
    1.25 +ADD_SUBDIRECTORY(src)
    1.26  
    1.27  ## Sometimes MSVC overwhelms you with compiler warnings which are impossible to
    1.28  ## avoid. Then comment out these sections. Normally you won't need it as the
     2.1 --- a/main.cc	Tue Mar 22 19:51:48 2011 +0100
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,26 +0,0 @@
     2.4 -/* -*- mode: C++; indent-tabs-mode: nil; -*-
     2.5 - *
     2.6 - * This file is a part of LEMON, a generic C++ optimization library.
     2.7 - *
     2.8 - * Copyright (C) 2003-2009
     2.9 - * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    2.10 - * (Egervary Research Group on Combinatorial Optimization, EGRES).
    2.11 - *
    2.12 - * Permission to use, modify and distribute this software is granted
    2.13 - * provided that this copyright notice appears in all copies. For
    2.14 - * precise terms see the accompanying LICENSE file.
    2.15 - *
    2.16 - * This software is provided "AS IS" with no warranty of any kind,
    2.17 - * express or implied, and with no claim as to its suitability for any
    2.18 - * purpose.
    2.19 - *
    2.20 - */
    2.21 -
    2.22 -#include<lemon/list_graph.h>
    2.23 -
    2.24 -///The main entry point
    2.25 -int main()
    2.26 -{
    2.27 -  lemon::ListGraph g;
    2.28 -  g.addNode();
    2.29 -}
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/src/CMakeLists.txt	Tue Mar 22 20:09:43 2011 +0100
     3.3 @@ -0,0 +1,29 @@
     3.4 +INCLUDE_DIRECTORIES(
     3.5 +  ${CMAKE_SOURCE_DIR}
     3.6 +  ${CMAKE_SOURCE_DIR}/src
     3.7 +  ${CMAKE_BINARY_DIR}/src
     3.8 +)
     3.9 +
    3.10 +## Here we define an executable target. Its name is 'lemon-project' and
    3.11 +## is compiled from 'main.cc'. You can add more source files separated
    3.12 +## with whitespaces (including newlines). If you want to build more
    3.13 +## executables, simple repeat (and edit) the following ADD_EXECUTABLE and
    3.14 +## TARGET_LINK_LIBRARIES statements.
    3.15 +
    3.16 +ADD_EXECUTABLE(lemon-project
    3.17 +        main.cc
    3.18 +)
    3.19 +
    3.20 +## This tells cmake to install 'lemon-project' to $PREFIX/bin when
    3.21 +## 'make install' is executed. You can give more targets separated
    3.22 +## by whitespaces.
    3.23 +
    3.24 +TARGET_LINK_LIBRARIES(lemon-project
    3.25 +  ${LEMON_LIBRARIES}
    3.26 +)
    3.27 +
    3.28 +INSTALL(
    3.29 +  TARGETS lemon-project
    3.30 +  RUNTIME DESTINATION bin
    3.31 +  COMPONENT bin
    3.32 +)
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/src/main.cc	Tue Mar 22 20:09:43 2011 +0100
     4.3 @@ -0,0 +1,26 @@
     4.4 +/* -*- mode: C++; indent-tabs-mode: nil; -*-
     4.5 + *
     4.6 + * This file is a part of LEMON, a generic C++ optimization library.
     4.7 + *
     4.8 + * Copyright (C) 2003-2009
     4.9 + * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    4.10 + * (Egervary Research Group on Combinatorial Optimization, EGRES).
    4.11 + *
    4.12 + * Permission to use, modify and distribute this software is granted
    4.13 + * provided that this copyright notice appears in all copies. For
    4.14 + * precise terms see the accompanying LICENSE file.
    4.15 + *
    4.16 + * This software is provided "AS IS" with no warranty of any kind,
    4.17 + * express or implied, and with no claim as to its suitability for any
    4.18 + * purpose.
    4.19 + *
    4.20 + */
    4.21 +
    4.22 +#include<lemon/list_graph.h>
    4.23 +
    4.24 +///The main entry point
    4.25 +int main()
    4.26 +{
    4.27 +  lemon::ListGraph g;
    4.28 +  g.addNode();
    4.29 +}