]> OCCT Git - occt-wok.git/commitdiff
0023568: Activate executable project in workspace generated for Code::Blocks
authorkgv <kgv@opencascade.com>
Thu, 22 Nov 2012 05:12:01 +0000 (09:12 +0400)
committeribs <ibs@opencascade.com>
Wed, 5 Dec 2012 07:38:50 +0000 (11:38 +0400)
src/WOKTclLib/OS.tcl

index a730bf63c3303329efd70c17f136b9ddb9fa9438..1d8f08cc89a7379f52e32647e9cc4eaba1755b3e 100644 (file)
@@ -3109,6 +3109,7 @@ proc OS:MKCMK { theOutDir {theModules {}} {theAllSolution ""} } {
 proc OS:cworkspace { theSolName theModules theOutDir } {
   set aWsFilePath "${theOutDir}/${theSolName}.workspace"
   set aFile [open $aWsFilePath "w"]
+  set isActiveSet 0
   puts $aFile "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\" ?>"
   puts $aFile "<CodeBlocks_workspace_file>"
   puts $aFile "\t<Workspace title=\"${theSolName}\">"
@@ -3141,10 +3142,15 @@ proc OS:cworkspace { theSolName theModules theOutDir } {
           if {[wokinfo -x $aUnitLoc] != "0"} {
             set aDependencies [LibToLinkX $aUnitLoc [file rootname $aSrcFile]]
           }
+          set anActiveState ""
+          if { $isActiveSet == 0 } {
+            set anActiveState " active=\"1\""
+            set isActiveSet 1
+          }
           if { [llength $aDependencies] == 0 } {
-            puts $aFile "\t\t<Project filename=\"${aPrjName}.cbp\" />"
+            puts $aFile "\t\t<Project filename=\"${aPrjName}.cbp\"${anActiveState}/>"
           } else {
-            puts $aFile "\t\t<Project filename=\"${aPrjName}.cbp\" >"
+            puts $aFile "\t\t<Project filename=\"${aPrjName}.cbp\"${anActiveState}>"
             foreach aDepTk $aDependencies {
               puts $aFile "\t\t\t<Depends filename=\"${aDepTk}.cbp\" />"
             }