Prepend DESTDIR to CMAKE_MODULE_PATH

This commit is contained in:
Jean-Paul Chaput 2010-05-22 14:14:37 +00:00
parent a0bd6c2015
commit 29a2cba501
2 changed files with 5 additions and 5 deletions

View File

@ -34,13 +34,13 @@ ENDIF(COMMAND CMAKE_POLICY)
MACRO(SETUP_PROJECT_PATHS project)
IF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
MESSAGE("-- ${project}_TOP is set to $ENV{${project}_TOP}")
SET(PROJECT_MODULE_PATH "$ENV{${project}_TOP}/share/cmake/Modules/")
SET(PROJECT_MODULE_PATH "${DESTDIR}$ENV{${project}_TOP}/share/cmake/Modules/")
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
ENDIF( NOT("$ENV{${project}_TOP}" STREQUAL "") )
IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )
MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}")
SET(PROJECT_MODULE_PATH "$ENV{${project}_USER_TOP}/share/cmake/Modules/")
SET(PROJECT_MODULE_PATH "${DESTDIR}$ENV{${project}_USER_TOP}/share/cmake/Modules/")
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}")
ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") )

View File

@ -157,7 +157,7 @@ int main ( int argc, char *argv[] )
"allowed to perform." )
( "cell,c" , poptions::value<string>()
, "The name of the cell to load, whithout extension." )
( "save,s" , poptions::value<string>()->default_value("")
( "save-design,s" , poptions::value<string>()->default_value("")
, "Save the routed design.")
( "save-global" , poptions::bool_switch(&saveGlobal)->default_value(false)
, "Save the global routing solution.");
@ -337,8 +337,8 @@ int main ( int argc, char *argv[] )
kite->dumpMeasures ();
kite->destroy ();
if ( arguments.count("save") ) {
cell->setName ( arguments["save"].as<string>().c_str() );
if ( arguments.count("save-design") ) {
cell->setName ( arguments["save-design"].as<string>().c_str() );
af->saveCell ( cell, Catalog::State::Physical );
}