Skip to content

Commit

Permalink
add a main
Browse files Browse the repository at this point in the history
  • Loading branch information
payetvin committed Dec 19, 2024
1 parent 67cd455 commit a807358
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 0 deletions.
60 changes: 60 additions & 0 deletions src/solver/modeler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,63 @@ add_subdirectory(api)
add_subdirectory(ortoolsImpl)
add_subdirectory(loadFiles)
add_subdirectory(parameters)


#
# Resource file for Windows
#
if (WIN32)
file(REMOVE "${CMAKE_CURRENT_SOURCE_DIR}/win32/modeler.o")
FILE(COPY "${CMAKE_CURRENT_SOURCE_DIR}/win32/modeler.ico" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}/win32/")
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/win32/modeler.rc.cmake"
"${CMAKE_CURRENT_SOURCE_DIR}/win32/modeler.rc")

if (MINGW)
# resource compilation for mingw
add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/win32/modeler.o"
COMMAND windres.exe "-I${CMAKE_CURRENT_SOURCE_DIR}"
"-i${CMAKE_CURRENT_SOURCE_DIR}/win32/modeler.rc"
-o "${CMAKE_CURRENT_BINARY_DIR}/win32/modeler.o")
set(SRCS ${SRCS} "${CMAKE_CURRENT_BINARY_DIR}/win32/modeler.o")
else ()
set(SRCS ${SRCS} "win32/modeler.rc")
endif ()
endif ()

OMESSAGE(" :: modeler")

set(exec_name "antares-modeler")

add_library(modeler-lib INTERFACE
${SRCS}
)

add_executable(antares-modeler
main.cpp
${SRCS}
)

set_target_properties(antares-modeler PROPERTIES OUTPUT_NAME ${exec_name})

target_link_libraries(modeler-lib
INTERFACE
Antares::loadModelerFiles
modeler-parameters
)

target_link_libraries(antares-modeler
PRIVATE
modeler-lib
)

import_std_libs(antares-modeler)
executable_strip(antares-modeler)

copy_dependency(sirius_solver antares-modeler)

install(TARGETS antares-modeler EXPORT antares-modeler DESTINATION bin)

INSTALL(EXPORT antares-modeler
FILE antares-modelerConfig.cmake
DESTINATION cmake
)
31 changes: 31 additions & 0 deletions src/solver/modeler/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/*
* Copyright 2007-2024, RTE (https://www.rte-france.com)
* See AUTHORS.txt
* SPDX-License-Identifier: MPL-2.0
* This file is part of Antares-Simulator,
* Adequacy and Performance assessment for interconnected energy networks.
*
* Antares_Simulator is free software: you can redistribute it and/or modify
* it under the terms of the Mozilla Public Licence 2.0 as published by
* the Mozilla Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* Antares_Simulator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* Mozilla Public Licence 2.0 for more details.
*
* You should have received a copy of the Mozilla Public Licence 2.0
* along with Antares_Simulator. If not, see <https://opensource.org/license/mpl-2-0/>.
*/

#include <antares/logs/logs.h>

#include <antares/solver/modeler/loadFiles/loadFiles.h>
#include <antares/solver/modeler/parameters/modelerParameters.h>

int main(int argc, const char** argv)
{

return 0;
}

0 comments on commit a807358

Please sign in to comment.